let http = require('http'),
    url = require('url');
let h = (req, res) => {
    console.log(req.url);
    console.log(url.parse(req.url, true));
    
    let { pathname, query } = url.parse(req.url, true);

    if (pathname === '/list') {
        let { callback } = query;

        
        let data = { code: 0, message: 'ok' }
        res.end(`${callback}(${JSON.stringify(data)})`);
        //'fn(data)';
    }
}
http.createServer(h).listen(6800, () => {
    console.log('启动了6800服务');
})